package BusinessLogic;

import Data.GoodData;
import Data.GoodDataOperator;

public class ReturnItem {

	private int saleRecordID;
	private int goodID;
	private int returnNumber;
	private double price;
	private double specialPrice;
	private String date;
	
	private GoodDataOperator gDataOpe = new GoodDataOperator();
	
	public void setDate(String da){
		date = da;
	}
	
	public String getDate(){
		return date;
	}
	
	public void setSpecialPrice(double spepri){
		specialPrice = spepri;
	}
	
	public double getSpecialPrice(){
		return specialPrice;
	}
	
	public void setPrice(double pri){
		price = pri;
	}
	
	public double getPrice(){
		return price;
	}
	
	public ReturnItem(){
		
	}
	
	public ReturnItem(int srID,int gID,int rNum,double pri,double spepri,String da){
		saleRecordID = srID;
		goodID = gID;
		returnNumber = rNum;
		price = pri;
		specialPrice = spepri;
		date = da;
	}
	
	public int getSaleRecordID(){
		return saleRecordID;
	}
	
	public void setSaleRecordID(int srID){
		saleRecordID = srID;
	}
	
	public int getGoodID(){
		return goodID;
	}
	
	public void setGoodID(int gID){
		goodID = gID;
	}
	
	public int getReturnNumber(){
		return returnNumber;
	}
	
	public void setReturnNumber(int rNum){
		returnNumber = rNum;
	}
	
	public double getGoodPrice(){
		double i;
		GoodData gd = (GoodData) gDataOpe.readDataByID(goodID);
		i = gd.getPrice();
		return i;
	}
}
